﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(SetModelCenterPosition), true)]
public class SetModelCenterPositionHelper : Editor
{

    private SetModelCenterPosition m_Script;

    private void Awake()
    {
        m_Script = target as SetModelCenterPosition;
    }

    public override void OnInspectorGUI()
    {
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("修改模型顶点位置"))
        {
            Debug.LogError("修改模型顶点位置");
            m_Script.AdjustPivot();
        }
        GUILayout.EndHorizontal();

        base.OnInspectorGUI();
    }
}
